<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>acts_as_messageable (Sergi::Acts::Messageable::ClassMethods)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File lib/acts_as_messageable.rb, line 27</span>
        <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">acts_as_messageable</span>(<span class="ruby-identifier">options</span> = {})
          <span class="ruby-identifier">cattr_accessor</span> <span class="ruby-identifier">:mailbox_types</span>
          <span class="ruby-identifier">has_many</span> <span class="ruby-identifier">:mail</span>, <span class="ruby-identifier">:order</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'created_at DESC'</span>, <span class="ruby-identifier">:dependent</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:delete_all</span>
          
          <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">mailbox_types</span> = {
            <span class="ruby-identifier">:received</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:inbox</span>,
            <span class="ruby-identifier">:sent</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:sentbox</span>,
            <span class="ruby-identifier">:deleted</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:trash</span>
          }.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">options</span>)
          
          <span class="ruby-identifier">include</span> <span class="ruby-constant">Sergi</span><span class="ruby-operator">::</span><span class="ruby-constant">Acts</span><span class="ruby-operator">::</span><span class="ruby-constant">Messageable</span><span class="ruby-operator">::</span><span class="ruby-constant">InstanceMethods</span>
          <span class="ruby-comment cmt">#extend Juixe::Acts::Commentable::SingletonMethods</span>
        <span class="ruby-keyword kw">end</span></pre>
</body>
</html>